#ifndef OQUEUE_H
#define OQUEUE_H

template <typename T> class Queue
{
private:
	template <typename T> class Node
	{
	public:
		volatile Node<T>			*m_next;
		T							m_value;

		Node(T value) :
			m_next(0)
		{
			m_value	= value;
		}

		~Node()
		{
			delete m_next;
		}

		void append(T value)
		{
			if (m_next == 0)
			{
				m_next	= new Node<T>(value);
			}
			else
			{
				m_next->append(value);
			}
		}
	};

	volatile Node<T>*		m_first;

public:
	Queue();
	~Queue();

	void push(T value);
	void pop();
	bool has();
	T first();
};

#endif // OQUEUE_H
